package day2.Exer;

import java.util.Scanner;

public class Circle {
    double radius;
    double x;
    double y;
    double PI=3.14;
    double area;
    double perimeter;
    Scanner in=new Scanner(System.in);
    public double getx(){
        System.out.println("请输入x的值：");
        x=in.nextDouble();
        return x;
    }
    public double gety(){
        System.out.println("请输入y的值：");
        y=in.nextDouble();
        return y;
    }
    public double getradius() {
        System.out.println("请输入半径：");
        radius=in.nextDouble();
        return radius;
    }
    public double getarea(){
        return PI*radius*radius;
    }
    public double getperimeter(){
        return PI*2*radius;
    }
    public void show(){
        System.out.println("圆心坐标是"+"("+x+","+y+")"+"\n圆的半径是:"+radius+"\n圆的周长是："+perimeter+"\n圆的面积是:"+area);
    }

}